package com.tjsinfo.tjsoa.reminded.bo;

import java.util.List;

import com.tjsinfo.tjsoa.Dao.IHibernateDao;
import com.tjsinfo.tjsoa.Dao.IQbcDao;
import com.tjsinfo.tjsoa.reminded.dao.ITSystemRemindedDao;
import com.tjsinfo.tjsoa.reminded.vo.TSystemReminded;

public class TSystemRemindedManagerImpl implements TSystemRemindedManager {
	
	private IHibernateDao hibernateDao;
	private IQbcDao qbcDao;	
	private ITSystemRemindedDao systemRemindedDao;
	
	public IHibernateDao getHibernateDao() {
		return hibernateDao;
	}
	public void setHibernateDao(IHibernateDao hibernateDao) {
		this.hibernateDao = hibernateDao;
	}
	
	public IQbcDao getQbcDao() {
		return qbcDao;
	}
	public void setQbcDao(IQbcDao qbcDao) {
		this.qbcDao = qbcDao;
	}	
	
	public ITSystemRemindedDao getSystemRemindedDao() {
		return systemRemindedDao;
	}
	public void setSystemRemindedDao(ITSystemRemindedDao systemRemindedDao) {
		this.systemRemindedDao = systemRemindedDao;
	}
	public void save(TSystemReminded transientInstance) {
		// TODO Auto-generated method stub
//		BoIm boim = new BoIm();
//		String temp[]=transientInstance.getIdList().split(",");
//		for (int j = 0; j < temp.length; j++) {
//			try {
//				if(!temp[j].equals("")&&temp[j]!=null)boim.sendID(temp[j], "您有收到一条特殊提醒,请及时查收!");
//			} catch (Exception e) {
//				// TODO: handle exception
//			}			
//		}
		systemRemindedDao.save(transientInstance);
//		return hibernateDao.save(object);
	}
	
	public void delete(TSystemReminded persistentInstance) {
		// TODO Auto-generated method stub
		systemRemindedDao.delete(persistentInstance);
//		hibernateDao.delete(systemReminded);
	}

	public void update(TSystemReminded persistentInstance) {
		// TODO Auto-generated method stub
		systemRemindedDao.update(persistentInstance);
	}
	
	public TSystemReminded findById(Integer id) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findById(id);
//		DetachedCriteria criteria = DetachedCriteria.forClass(TSystemReminded.class);
//		criteria.add(Restrictions.eq("id", id));
//		return  (TSystemReminded) qbcDao.getCriteria(criteria).iterator().next();
	}
	
	public TSystemReminded findByName(String name) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByName(name);
	}
	
	public TSystemReminded findByOrganize(String Organize) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByOrganize(Organize);
	}

	public List findByProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByProperty(propertyName, value);
//		DetachedCriteria criteria = DetachedCriteria.forClass(TSystemReminded.class);
//		criteria.add(Restrictions.eq("propertyName", value));
//		return  (List) qbcDao.getCriteria(criteria).iterator().next();
	}

	public List findByRemind(String idList, Object value,
			String memo, Object values) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByRemind(idList, value, memo, values);
	}
	
	public List findByPropertyAndProperty(String propertyName, Object value,
			String propertyNames, Object values) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByPropertyAndProperty(propertyName, value, propertyNames, values);
	}


	public List findByLike(String likeName, Object value) {
		// TODO Auto-generated method stub
		return systemRemindedDao.findByLike(likeName, value);
	}
	
	
}
